//
//  UINavigationController+Manager.h
//  高仿暴走斗图
//
//  Created by huangsongyao on 16/3/14.
//  Copyright © 2016年 huangsongyao. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSUInteger, kHSYCustomViewAnimationTransitionType) {
    
    kHSYCustomViewAnimationTransitionTypeNone                       = 0,
    kHSYCustomViewAnimationTransitionTypeFlipFromLeft,
    kHSYCustomViewAnimationTransitionTypeFlipFromRight,
    kHSYCustomViewAnimationTransitionTypeCurlUp,
    kHSYCustomViewAnimationTransitionTypeCurlDown,
    kHSYCustomViewAnimationTransitionTypeFadeIn,
    kHSYCustomViewAnimationTransitionTypeMoveIn,
    kHSYCustomViewAnimationTransitionTypePush,
    kHSYCustomViewAnimationTransitionTypeReveal,
};


@interface UINavigationController (Manager)

/**
 *  寻找某个vc控制器在它的nav控制器中的level
 *
 *  @param viewController vc控制器
 *
 *  @return level
 */
- (NSInteger)findNavigationControllerSubViewControllerIndexToViewController:(id)viewController;

/**
 *  标准动画
 *
 *  @param viewController vc控制器
 *  @param duration       动画时间
 *  @param options        动画需求
 *  @param completion     完成后的block
 */
- (void)standardAnimationWithController:(UIViewController *)viewController duration:(NSTimeInterval)duration options:(UIViewAnimationOptions)options changesCompletion:(void (^)(void))completion;

/**
 *  核心动画
 *
 *  @param viewController vc控制器
 *  @param duration       动画时长
 *  @param type           类型，执行动画的某个特定类型
 *  @param subtype        方向
 *  @param completion     完成后的block
 */
- (void)coreAnimationWithController:(UIViewController *)viewController duration:(NSTimeInterval)duration type:(NSString *)type subtype:(NSString *)subtype changesCompletion:(void (^)(void))completion;

/**
 *  动画时间
 *
 *  @return 返回动画时间
 */
- (CGFloat)animationDuration;

/**
 *  给view的layer层添加边界阴影效果
 *
 *  @param view
 */
- (void)addShadowToView:(UIView *)view;

/**
 *  截屏
 *
 *  @param frame 获取到截屏图片的frame
 *  @param view  要截取的view层
 *
 *  @return 截屏图片
 */
- (UIImageView *)getScreenImageViewForFrame:(CGRect)frame captureImageInView:(UIView *)view;

- (UIImageView *)getScreenImageViewForFrame:(CGRect)frame andImage:(UIImage *)image;
@end
